#pragma once
#include <stdio.h>
#include "stdafx.h"
#include "GbcParser.h"

bool SNU_parse_gbc(const char* filename, char** image_arrays)
{
	bool result = false;
	int i;
    do
    {
	    FILE* filehandle = fopen(filename, "rb");
        if ( !filehandle )
            break;

	    char header[SNU_GBC_HEADER_SIZE];
	    fread(header , SNU_GBC_HEADER_SIZE, 1, filehandle);

	    for (i=0; i<8; i++)
	    {
		    fread(image_arrays[i], SNU_GBC_IMAGE_WIDTH*SNU_GBC_IMAGE_HEIGHT, 1, filehandle);
	    }
		fclose(filehandle);
	
	    result = true;
    } while(0);

	return result;
}